<?php

namespace App\Models\FilterableAssetBundle;

use Hyn\Tenancy\Traits\UsesTenantConnection;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion
 *
 * @property int $id
 * @property int $bundle_id
 * @property string $asset_type
 * @property string $field_name
 * @property string $field_value
 * @property string $operator
 * @property int $quantity
 * @property string|null $deleted_at
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\FilterableAssetBundle\FilterableAssetBundle $bundle
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereAssetType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereBundleId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereFieldName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereFieldValue($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereOperator($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereQuantity($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FilterableAssetBundle\FilterableAssetBundleCriterion whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class FilterableAssetBundleCriterion extends Model
{
    use UsesTenantConnection;
    protected $guarded = [];
    protected $table = "filterable_asset_bundle_criteria";

    public function bundle()
    {
        return $this->belongsTo(FilterableAssetBundle::class, "bundle_id");
    }
}
